﻿using System;
using System.Globalization;
using System.Windows.Data;

namespace CefWebrtcDemo.wpf
{
    public class VisibilityToTextConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            bool isVisible = value != null && (bool)value;
            return isVisible ? "从房间退出" : "加入到房间";
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}